Skip to content

London | 26-ITP-May | Khaliun Baatarkhuu | Sprint 2 | Coursework#1355

Open
khaliun-dev wants to merge 13 commits into
CodeYourFuture:mainfrom
khaliun-dev:coursework/sprint-2
Open

London | 26-ITP-May | Khaliun Baatarkhuu | Sprint 2 | Coursework#1355
khaliun-dev wants to merge 13 commits into
CodeYourFuture:mainfrom
khaliun-dev:coursework/sprint-2

Conversation

@khaliun-dev

Copy link
Copy Markdown

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Changelist

  • fixed errors in code
  • did debugging exercises
  • made new functions
  • interpreted code to see if i understand it

Questions

None so far.

Removed duplicate declaration of 'str' in the capitalise function.
Removed clashing variable and corrected function call.
Fixed the square function to accept a parameter and return its square.
Updated the multiply function to return the product instead of just logging it. This allows the result to be used in the template literal.
Removed semicolon to ensure the sum function returns the correct value.
Updated getLastDigit function to accept a parameter and return the last digit of the input number. Adjusted console.log calls to use the function correctly.
Implemented the toPounds function to convert pence to pounds format.
Added answers to questions regarding the pad function in time formatting.
Refactor formatAs12HourClock function to handle noon and midnight correctly.
@khaliun-dev khaliun-dev added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. 📅 Sprint 2 Assigned during Sprint 2 of this module Module-Structuring-And-Testing-Data The name of the module. labels Jun 17, 2026

@LonMcGregor LonMcGregor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work on all these tasks, and well done for attempting the stretch. You can continue to work on that, otherwise this task is complete now.

console.log(calculateBMI(80, 1.76));

25.8
//(I am officially overweight, :(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BMI has lots of limitations as a measuring system, so don't worry about it too much :)

console.assert(currentOutput3 === targetOutput3);

console.log(formatAs12HourClock("15:29"));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that you have found the bugs, do you know what would be needed to fix them?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for reviewing my code. I have fixed both bugs. Cheers.

@LonMcGregor LonMcGregor added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Jun 22, 2026
Handle special case for 12 PM in formatAs12HourClock function.
Fixed time formatting to include minutes in 12-hour clock.
@khaliun-dev khaliun-dev added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Module-Structuring-And-Testing-Data The name of the module. Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Reviewed Volunteer to add when completing a review with trainee action still to take. 📅 Sprint 2 Assigned during Sprint 2 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants